import React, { useState } from 'react'
import { Space } from 'antd'
import Cron from './components/cron'

function App() {
  const [cronVal, setCronVal] = useState("")
  return (
    <div style={{ display: "flex", flexDirection: "column", alignItems: "center" }}>
      <h2 style={{ margin: "20px 0" }}>Cron表达式</h2>
      <Cron
        value="* * * * * ? *"
        defaultTab={"second"}
        onOk={(value: string) => setCronVal(value)}
      />
      <h2 style={{ marginTop: 20 }}>{cronVal}</h2>
    </div>
  )
}

export default App
